﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Index
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Index</h2>
    <ul>
         
    
    <% foreach (ControlPoint.ControlAPI.Device device in (List<ControlPoint.ControlAPI.Device>)ViewData["Devices"]) { %>
        <li><a href="<%= this.Url.Action ( "Settings" ) + "?id=" + HttpUtility.UrlEncode(ControlServer.Utilities.base64Encode(device.ID))
           /*Html.ActionLink(Html.Encode(device.Name + " (" + device.ID + ")"),
                "Settings",
                 new { id = HttpUtility.UrlEncode(ControlServer.Utilities.base64Encode(device.ID)) }
                             )*/%>"><%=device.Name + " (" + device.ID + ")"%></a></li>
    <% } %>
    </ul>
</asp:Content>
